package com.test.dubbo.app.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import com.test.dubbo.app.exception.BusinessException;
import com.test.dubbo.app.model.UserDto;
import com.test.dubbo.app.service.HelloService;

@Service("helloServiceImpl")
public class HelloServiceImpl implements HelloService {

	@Override
	public String hello(UserDto userDto) throws BusinessException {
		String username = userDto.getUsername();
		if(StringUtils.isEmpty(username)) {
			throw new BusinessException("用户名不允许为空");
		}
		return "hello, " + username;
	}

    
    
}
